// Created by zyq on 2025/2/27.

#include "iostream"

using namespace std;

class Person {
public:
    string name;
    int age;


    // Person(string n, int a) : name(n),age(a){}

    Person(string n, int a) {
        this->name = n;
        this->age = a;
    }

    void toString() {
        cout << "Name:" << name << ",Age:" << age << endl;
    }

};

int main()
{
    Person p1("Jone", 10);
    p1.toString();

    Person *person = new Person("nnn", 9);
    person->toString();

    delete person;
    return 0;
}

